package springdemo03;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import springdemo03.dao.BookDao;
import springdemo03.pojo.Book;

/**
 * @ Author     ：LILA3
 * @ Date       ：Created in 2:04 PM 7/26/2018
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("setting.xml");
        BookDao bookDao = applicationContext.getBean(BookDao.class);
        Book book = new Book();
        book.setId(123);
        book.setName("zxczxcxzczc");
        System.out.println(bookDao.insert(book));
    }
}
